<?php
namespace User\Form;

use Zend\Form\Form;
use Zend\Form\Element;

class RoleForm extends Form {
	public function __construct($name = null)
	{
		parent::__construct('Role');
		
		$this->setAttribute('method', 'post');
		
		$rid = new Element\Hidden('rid');
		
		$key = new Element\Text('key');
		$key->setLabel('Key');
		$key->setAttribute('required', true);
		
		$name = new Element\Text('name');
		$name->setLabel('Name');
		
		$submit = new Element\Submit('submit');
		$submit->setValue('Add');
		
		$this->add($rid)
			->add($key)
			->add($name)
			->add($submit);
	}
}

?>